
import com.java.demo.model.ArticleInfo;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class App {
    public static void main(String[] args) {
        //1、得到容器对象
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
        //2、得到Bean对象
        ArticleInfo articleInfo = context.getBean("abc", ArticleInfo.class);
        //3、调用Bean方法
        System.out.println(articleInfo.toString());
    }
}
